import Vue from 'vue'
import Router from 'vue-router'
import Login from "../components/Login";
import Index from "../components/Index"
import Home from "../components/pages/Home";

import Usermanagement from "../components/user-management/user-management"
import Familyfile from "../components/user-management/family-file"
import DeliveryMessage from "../components/user-management/delivery-message"
import RefundOrder from "../components/refund-order/refund-order"
import RefundCheck from "../components/refund-order/refund-check"
import DoctorStat from "../components/doctor-stat/doctor-stat"
import Commonproblem from "../components/common-problem/common-problem"

import Prescription from "../components/prescription/Prescription.vue";
import PrescriptionOrder from "../components/prescription-order/PrescriptionOrder";
import PrescriptionDetail from "../components/prescription/PrescriptionDetail"
import PrescriptionOrderDetail from "../components/prescription-order/PrescriptionOrderDetail"
import HospitalManagement from "../components/pages/HospitalManagement"
import HospitalInfo from "../components/pages/HospitalInfo"

//混天绫
import CustomerServiceManagement from "../components/authority/CustomerServiceManagement";
import Detail from "../components/authority/Detail";
import GuahaoOrder from "../components/guahao-order/GuahaoOrder";
import Conversation from "../pages/authority/conversation";
import GuahaoDetail from "../components/guahao-order/GuhaoDetail.vue";
import TransactionStat from "../components/transaction-stat/transaction-stat"

import ServiceAudit from "../components/pages/ServiceAudit";
import DoctorAudit from "../components/pages/DoctorAudit";
import DoctorList from "../components/pages/DoctorList";
import DoctorInfo from "../components/pages/DoctorInfo";
import InterogationOrder from '../components/interogationOrderManagement/interogationOrder'
import TradingRecord from '../components/financialManagement/tradingRecords/tradingRecord'
import SuccessRecord from '../components/financialManagement/tradingRecords/successRecord'
import RefundRecord from '../components/financialManagement/tradingRecords/refundRecord'
import SettleManagement from '../components/financialManagement/settleManagement/settleManagement'
import SettleRecord from '../components/financialManagement/settleManagement/settleRecord'
import BalanceRecord from '../components/financialManagement/settleManagement/balanceRecord'
import TransferManagement from '../components/financialManagement/transferManagement/transferManagement'
import Feedback from "../components/pages/Feedback"
import MedicineOrder from "../components/pages/MedicineOrder"
import AllMedicine from "../components/pages/AllMedicine"
import MedicinePass from "../components/pages/MedicinePass"
import MedicineCategory from "../components/pages/MedicineCategory"
import Departments from "../components/hospital-departments/departments"
import PlatformDepartmentManagement from "../components/platform/PlatformDepartmentManagement"
import Members from "../components/members/members"
import Modify from "../pages/authority/role/modify"
import Log from "../components/authority/Log"
import MedicineOrderDetails from "../components/pages/MedicineOrderDetails"
import AddNewMedicine from "../components/pages/AddNewMedicine"
import MedicineDetails from "../components/pages/MedicineDetails"

import ActivityManagement from "../components/business/activityManagement"
import CouponManagement from "../components/business/couponManagement"
import MessageManagement from "../components/business/messageManagement"

import MedicineManagement from '../components/medicine/medicineManagement.vue';

Vue.use(Router)

export default new Router({
  routes: [{
      path: '/',
      redirect: '/login'
    },
    {
      path: '/login',
      name: 'Login',
      component: Login
    },
    {
      path: '/index',
      name: 'Index',
      component: Index,
      children: [{
          path: 'home',
          name: 'Home',
          component: Home
        },
        {
          path: 'hospitalManagement',
          name: 'HospitalManagement',
          component: HospitalManagement
        },
        {
          path: 'hospitalInfo',
          name: 'HospitalInfo',
          component: HospitalInfo
        },
        //任桐锐-用户管理
        {
          path: 'user-management',
          name: 'Usermanagement',
          component: Usermanagement,
          meta:{
              keepAlive:true
          }
        },
        {
          path: 'family-file/:userid',
          name: 'Familyfile',
          component: Familyfile,
        },
        {
          path: 'delivery-message/:userid',
          name: 'DeliveryMessage',
          component: DeliveryMessage
        },
        //任桐锐-退款申请
        {
          path: 'refund-order',
          name: 'RefundOrder',
          component: RefundOrder
        },
        {
          path: 'refund-check/:id',
          name: 'RefundCheck',
          component: RefundCheck
        },
        //任桐锐-医生统计
        {
          path: 'doctor-stat',
          name: 'DoctorStat',
          component: DoctorStat
        },
        //任桐锐-常见问题
        {
          path: 'common-problem',
          name: 'Commonproblem',
          component: Commonproblem
        },
        //赵健-处方管理
        {
          path: 'prescription',
          name: 'Prescription',
          component: Prescription
        },
        //赵健-处方订单
        {
          path: 'prescriptionOrder',
          name: 'PrescriptionOrder',
          component: PrescriptionOrder
        },
        //赵健-处方详情
        {
          path: 'prescriptionDetail',
          name: 'PrescriptionDetail',
          component: PrescriptionDetail
        },
        //赵健-处方订单详情
        {
          path: 'prescriptionOrderDetail',
          name: 'PrescriptionOrderDetail',
          component: PrescriptionOrderDetail
        },
        //赵健-医院科室
        {
          path: 'departments',
          name: 'Departments',
          component: Departments
        },
        //赵健-成员管理
        {
            path: 'members',
            name: 'Members',
            component: Members
        },
        //芋蓝子-药品订单
        {
          path: 'medicineorder',
          name: 'MedicineOrder',
          component: MedicineOrder
        },
        //客服
        {
          path: 'conversation',
          name: 'Conversation',
          component: Conversation
        },
        {
          path:'medicinedetails',
          name:'MedicineDetails',
          component:MedicineDetails
        },
        //芋蓝子-药品订单详情
        {
          path: 'medicineorderdetails',
          name: 'MedicineOrderDetails',
          component: MedicineOrderDetails 
        },
        
        //芋蓝子-意见管理
        {
          path: 'feedback',
          name: 'Feedback',
          component: Feedback
        },
        {
            path:'conversation',
        name: 'Conversation',
        component: Conversation},
          {path: 'guahaoDetail',
          name: 'GuahaoDetail',
          component: GuahaoDetail
        },
        //修改资料
        {
          path: 'medicinedetails',
          name: 'MedicineDetails',
          component: MedicineDetails
        },
        //客服管理
        {
          path: 'customerServiceManagement',
          name: 'CustomerServiceManagement',
          component: CustomerServiceManagement
        },
        {
          path: 'detail',
          name: 'Detail',
          component: Detail
        },
        {
          path: 'modify',
          name: 'Modify',
          component: Modify
        },
        //操作日志
        {
          path: 'log',
          name: 'Log',
          component: Log
        },
        //挂号订单管理
        {
          path: 'guahaoOrder',
          name: 'GuahaoOrder',
          component: GuahaoOrder
        },
        // 交易统计
        {
          path: 'transactionStat',
          name: 'TransactionStat',
          component: TransactionStat
        },
        {
          path: 'addnewmedicine',
          name: 'AddNewMedicine',
          component: AddNewMedicine

        },
        {
          path: 'doctor/screen',
          name: 'DoctorAudit',
          component: DoctorAudit
        },
        {
          path: 'server/screen',
          name: 'ServiceAudit',
          component: ServiceAudit
        },
        {
          path: 'doctor/list',
          name: 'DoctorList',
          component: DoctorList
        },
        {
          path: 'doctor/info',
          name: 'DoctorInfo',
          component: DoctorInfo
        },
        {
          path: "interogationOrderManagement",
          name: 'InterogationOrder',
          component: InterogationOrder
        },
        {
          path: "tradingRecord",
          component: TradingRecord,
          children: [{
              path: 'successRecord',
              component: SuccessRecord
            },
            {
              path: 'refundRecord',
              component: RefundRecord
            },

          ],
          redirect: '/index/tradingRecord/successRecord'
        },
        {
          path: "settleManagement",
          component: SettleManagement,
          children: [{
              path: 'settleRecord',
              component: SettleRecord
            },
            {
              path: 'balanceRecord',
              component: BalanceRecord
            }
          ],
          redirect: '/index/settleManagement/settleRecord'
        },
        {
          path: "transferManagement",
          component: TransferManagement
        },
        //雷珉-运营管理
        {
          path: 'business/activity',
          name: 'activityManagement',
          component: ActivityManagement
        },
        {
          path: 'business/coupon',
          name: 'couponManagement',
          component: CouponManagement
        },
        {
          path: 'business/message',
          name: 'messageManagement',
          component: MessageManagement
        },
        //雷珉-药品管理
        {
          path: 'medicine/list',
          name: 'medicineManagement',
          component: MedicineManagement
        },
      ]
    },

  ]
})
